package com.jumper.study.front.helper;

import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.jumper.study.db.model.Lesson;

public class LessonHelper {
    public static SFunction<Lesson, ?> getSort(String field) {
        switch(field) {
            case "id":
            return Lesson::getId;
            case "price":
            return Lesson::getPrice;
            case "sort":
            return Lesson::getSort;
            default:
            return Lesson::getSort;
        }
    }
}
